//
//  DoctorBaseViewController.m
//  QuickCure1
//
//  Created by summer的Dad on 16/10/31.
//  Copyright © 2016年 maoge. All rights reserved.
//

#import "DoctorBaseViewController.h"
static NSString *baseCellId = @"baseCellId";
@interface DoctorBaseViewController ()

@end

@implementation DoctorBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
    
    
    // Do any additional setup after loading the view.
}

- (void)setupUI
{
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark
#pragma mark - 创建tableView

- (void)createTableViewWithStyle:(UITableViewStyle)style {
    //创建TabView
    UITableView *baseTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:style];
    
    //代理方法
    [baseTableView setDelegate:self];
    [baseTableView setDataSource:self];
    //自适应行高
    [baseTableView setRowHeight:UITableViewAutomaticDimension];
    [baseTableView setEstimatedRowHeight:100.0];
    //注册
    [baseTableView registerClass:[UITableViewCell class] forCellReuseIdentifier:baseCellId];
    //添加tableView
    [self setTableView:baseTableView];
    //添加到视图
    [self.view addSubview:baseTableView];
}

#pragma mark
#pragma mark - 注册

- (void)registerCellWithClassName:(NSString *)className cellId:(NSString *)cellId {
    Class cellClass = NSClassFromString(className);
    [self.tableView registerClass:cellClass forCellReuseIdentifier:cellId];
}

- (void)registerXibCellWithXibName:(NSString *)xibName cellId:(NSString *)cellId {
    UINib *nibCell = [UINib nibWithNibName:xibName bundle:nil];
    [self.tableView registerNib:nibCell forCellReuseIdentifier:cellId];
}


#pragma mark - TableView DataSource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.modelList.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *CELL = [tableView dequeueReusableCellWithIdentifier:baseCellId forIndexPath:indexPath];
    if (indexPath.section == 2) {
        
    }
    CELL.textLabel.text = [NSString stringWithFormat:@"%zd", indexPath.row];
    return CELL;
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
